1. Field of the Invention
The present invention relates to an electronic apparatus which performs communication with an external device, a method for controlling, and a recording medium.
2. Description of the Related Art
A communication interface called High-Definition Multimedia Interface (HDMI) (registered trademark) is currently proposed. A communication system conforming to the HDMI standard (hereinafter referred to as “HDMI system”) includes a repeater having a function of a source device conforming to the HDMI standard and a sink device conforming to the HDMI standard. A source device having an output terminal for connecting an HDMI cable conforming to the HDMI standard performs process for transmitting video and audio data to a sink device via the HDMI cable. A sink device having an input terminal for connecting an HDMI cable performs process for receiving, via an HDMI cable, the video and audio data transmitted from the source device, displays the received video data, and outputs the received audio data.
In the HDMI system, the repeater can transmit a command conforming to the Consumer Electronics Control (CEC) protocol to the source and sink devices, and receive a command conforming to the CEC protocol from the source and sink devices.
Japanese Patent Application Laid-Open No. 2009-60204 discusses an electronic apparatus having an input/output terminal serving as an input terminal for connecting an HDMI cable to a sink device and as an output terminal for connecting an HDMI cable to a source device.
The electronic apparatus having the input/output terminals determines whether or not an external device connected via the HDMI cable is a sink or source device based on a voltage detected from a +5V line included in the HDMI cable and a voltage detected from a TMDS clock line included in the HDMI cable. When the external device connected to the electronic apparatus via the HDMI cable is a sink device, the electronic apparatus sets the relevant input/output terminal to the output mode, and performs transmission process for the external device. When the external device connected to the electronic apparatus via the HDMI cable is a source device, the electronic apparatus sets the relevant input/output terminal to the input mode, and performs receiving process for the external device.
When an electronic apparatus having a plurality of input/output terminals exists in the HDMI system, a plurality of sink devices may be connected to the electronic apparatus via respective input/output terminals. When a plurality of sink devices exists in the HDMI system, communication conforming to the CEC protocol (hereinafter referred to as CEC-protocol communication) cannot be normally performed in some cases.
The electronic apparatus having a plurality of input/output terminals may not determine whether or not each of external devices to be connected to the input/output terminals is a sink or source device before external devices have been connected to respective input/output terminals. Accordingly, the electronic apparatus having a plurality of input/output terminals cannot set each input/output terminal to the input or output mode before each of external devices connected to the input/output terminals is determined to be a sink or source device. In this case, a plurality of sink devices may be connected to the electronic apparatus having a plurality of input/output terminals via respective input/output terminals.
Therefore, even if the electronic apparatus can perform CEC-protocol communication with a first sink device connected to the electronic apparatus, connecting a second sink device to the electronic apparatus may disable CEC-protocol communication by the electronic apparatus.